package com.bangyu.monitor.modular.system.mapper;

import com.bangyu.monitor.modular.system.entity.ExtremityCount;
import com.bangyu.monitor.modular.system.entity.NotRecoverWeightPayload;
import com.bangyu.monitor.modular.system.entity.RecoverInfoDto;
import com.bangyu.monitor.modular.system.entity.WeightPayload;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 重型荷载 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2018-12-07
 */
public interface WeightPayloadMapper extends BaseMapper<WeightPayload> {

    public void batchInsert(@Param("batchs") List<WeightPayload> batchs);

    //查询没有恢复的重型荷载
    List<NotRecoverWeightPayload> queryByBeamNoAndNotRecover(@Param("beamNo") String beamNo);

    void updateRecover(@Param("id") Long id,@Param("recoverType") Integer recoverType,@Param("recoverTime") Date recoverTime);

    List<RecoverInfoDto> queryRecovered(@Param("beamNo") String beamNo,@Param("startDate") Integer startDate,@Param("endDate") Integer endDate);

    List<ExtremityCount> queryCountByExtremityLevel(@Param("beamNo") String beamNo,@Param("startDate") Integer startDate,@Param("endDate") Integer endDate);

}
